import React, { memo } from "react";
import { NavLink } from "react-router-dom";
import { TagStyle } from "./style";

export default memo(function Tag(props) {
  return (
    <TagStyle>
      <div className="playlist-bq">
        <span className="fl">标签:</span>
        {props.playlistData.playlist.tags.map((item, index) => {
          return (
            <NavLink
              to={{
                pathname: "/discover/songs/" + item,
              }}
              key={index}
              className="u-tag fl"
            >
              <i>{item}</i>
            </NavLink>
          );
        })}
      </div>
    </TagStyle>
  );
});
